﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bymed.SpineScan.DataModel;

namespace Bymed.SpineScan.Service.Interface
{
    public enum TestDateType
    {
        All = -1,       // All data
        NewAdded = 0,   // New added patient info without any testing history data.
        Testing = 1,    // Finished today's testing
        Tested = 2      // Finished the testing before today.
    }

    public interface IPatientService : IService<Patient>
    {
        /// <summary>
        /// Get new patient number
        /// </summary>
        /// <returns>Patient number</returns>
        string GetPatientNumber();

        /// <summary>
        /// Search the patient data based on provided TestType.
        /// </summary>
        /// <param name="patient">Patient instance contains the search condition values.</param>
        /// <param name="testDateType">Selected TestDateType.</param>
        /// <returns>Matched Patient data list.</returns>
        IList<Patient> SearchByTestDateType(Patient patient, TestDateType testDateType);

        /// <summary>
        /// Get all patient data and all related test results.
        /// </summary>
        /// <returns></returns>
        IList<Patient> GetAllWithTestResults();

        /// <summary>
        /// Delete all related Test data ONLY of specified Patient.
        /// </summary>
        /// <param name="patient">The specified Patient whom all related test data will be deleted.</param>
        void DeleteRelatedTestDataOnly(Patient patient);
    }
}
